package com.bwie.controller;

import com.bwie.pojo.R;
import com.bwie.pojo.dto.InterrogationDto;
import com.bwie.service.InterrogationService;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/interrogation")
@CrossOrigin
public class InterrogationController {
    @Autowired
    private InterrogationService interrogationService;

    /**
     * 问诊列表查询
     * @param interrogationDto
     * @return
     */
    @PostMapping("/getInterList")
    private R getInterList(@RequestBody InterrogationDto interrogationDto){
       return interrogationService.getInterList(interrogationDto);
    }
    /**
     * 单删
     */
    @DeleteMapping("/del/{interrogationId}")
    private R del(@PathVariable Integer interrogationId){
        return interrogationService.del(interrogationId);
    }
    /**
     * 批删
     */
    @PostMapping("/delAll")
    private R delAll(@RequestBody List<Integer> interDel){
        return interrogationService.delAll(interDel);
    }
}
